package com.etc
case class ScalaSort(val first :Int,val end :Int) extends Ordered[ScalaSort] with Serializable {
   def compare(that: ScalaSort): Int = {

    if(this.first - that.first != 0){
      that.end - this.end
    }else{
      this.first -  that.first
    }
  }
}
